package static_demo.学生工具类;

import java.util.ArrayList;

public class StudentUitl {
    StudentUitl(){}

    public static int getMaxAge(ArrayList<Student> list){
        int maxage=list.get(0).getAge();
        for (int i = 0; i < list.size(); i++) {
            int tempAge=list.get(i).getAge();
            if(tempAge>maxage){
                maxage=tempAge;
            }
        }
        return maxage;
    }
}
